@extends('backend::layout')

@section('title', '设备类型列表')

@section('content')
    <div class="card border-no">
        <div class="card-body">
            <h4 class="text-black f-20">消息通知</h4>
            <div class="clearfix"></div>
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th scope="col">#</th>

                        <th scope="col">消息内容</th>
                        <th scope="col">发送时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    @if(isset($list))
                        @foreach($list as $idx => $item)
                            <tr>
                                <th scope="row">
                                    {{--{{ $idx + 1 }}--}}
                                    @if($item->pivot->status == 0)
                                        <i class="fa fa-circle text-danger"></i>
                                    @endif
                                </th>

                                <td>
                                    <a  class="text-body" href="{{ route("admin.notice.view", ['id'=>$item->id]) }}">{{$item->title}}</a>
                                </td>

                                <td>
                                    {{ $item->created_at }}
                                </td>
                            </tr>
                        @endforeach
                    @endif
                    </tbody>
                </table>
            </div>
            <div class="row">
                <div class="clearfix"></div>
                <div class="col-md-12 col-sm-12 col-xs-12 pull-right">
                    @if(isset($list))
                        {{ $list->links() }}
                    @endif
                </div>
            </div>
        </div>
    </div>
@stop